# 求1-100的和
def sum_n(n):
    if n == 0:
        return 0
    return sum_n(n - 1) + n


# 求阶乘
def factorial(n):
    if n == 0:
        return 1
    return factorial(n - 1) * n


# fibonacci数列
def fibonacci(n):
    if n == 0:
        return 0
    elif n == 1:
        return 1
    return fibonacci(n - 1) + fibonacci(n - 2)


print(sum_n(100))
print(factorial(6))
print(fibonacci(7))
